Orchestrator Plugin: Crypto

by Simon Sparks · 1 October 2025

This is the TypeScript definition of the Crypto plugin which can be downloaded from the VMware GitHub repository.

By creating this TypeScript representation of the plugin we are able to easily use the functionality of the plugin from within the Build Tools and we can be sure that we have the correct property names and the correct function names and the correct inputs and the correct return types basically everything that makes TypeScript awesome.

https://github.com/vmware-archive/o11n-plugin-crypto

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: Plugin_Module_Crypto.d.ts

declare class CryptoCertificate {
    constructor (certString:string);

    serialNumber: string;
    encodedBase64: string;
    publicKeyPem: string;
    issuedToMap: Properties;
    issuedByDN: string;
    issuedToDN: string;
    pemEncoded: string;
    issuedByMap: Properties;
    signatureAlgorithm: string;
    sha1Fingerprint: string;
    signatureBase64: string;
    sha256Fingerprint: string;
    subjectAlternativeNames: string[];

    verify(pemKey: string): boolean;
    getValidbefore(): Date;
    getValidAfter(): Date;
    isValidOn(date: Date): Date;
}

declare class CryptoCertificateManager {
    public static parseCertificatePem(pemCertString: string): CryptoCertificate;
    public static getHttpsCertificate(urlString: string): CryptoCertificate[];
}

declare class CryptoDigest {
    public static sha1Base64(dataB64: string): string;
    public static sha1(data: string): string;
    public static md5(data: string): string;
    public static md5Base64(dataB64: string): string;
    public static sha384Base64(dataB64: string): string;
    public static hmacSha512(keyB64: string, dataB64: string): string;
    public static hmacMd5(keyB64: string, dataB64: string): string;
    public static hmacSha384(keyB64: string, dataB64: string): string;
    public static sha256(data: string): string;
    public static hmacSha256(keyB64: string, dataB64: string): string;
    public static hmacSha1(keyB64: string, dataB64: string): string;
    public static sha384(data: string): string;
    public static sha256Base64(dataB64: string): string;
    public static sha512(data: string): string;
    public static sha512Base64(dataB64: string): string;
}

declare class CryptoEncoding {
    public static binaryConcatBase64(b64data1: string, b64data2: string): string;
    public static base64EncodeBytes(data: byte[]): string;
    public static base64Encode(data: string): string;
    public static hexToBase64(hex: string): string;
    public static mimeToBase64(mime: MimeAttachment): string;
    public static base64ToMime(b64data: string, mimeType: string, fileName: string): MimeAttachment;
    public static base64Decode(b64data: string): string;
    public static getSubsetBase64(b64data: string, start: number, end: number): string;
    public static base64toHex(b64data: string): string;
    public static getLengthBase64(b64data: string): string;
}

declare class CryptoEncryption {
    public static generateRandomBytes(numberOfBytes: number): string;
    public static tripleDesEncrypt(dataB64: string, secretB64: string, ivB64: string): string;
    public static aesEncrypt(dataB64: string, secretB64: string, ivB64: string): string;
    public static aesDecrypt(encryptedB64: string, secretB64: string, ivB64: string): string;
    public static tripleDesDecrypt(encryptedB64: string, secretB64: string, ivB64: string): string;
    public static  generateRandomIv(): string;
}

declare class CryptoRSA {
    public static encrypt(key: string, dateB64: string): string;
    public static decrypt(key: string, encryptedB64: string): string;
    public static createSignature(key: string, dateB64: string): string;
    public static verifySignature(key: string, dateB64: string, signatureB64: string): boolean;
}


Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.