PubSignKey

PubSignKey

Holds the public part of a sign key pair

Constructor

new PubSignKey()

Source:

Methods

getRaw() → {Promise.<Buffer>}

Generate raw buffer of public sign key.

Source:
Example
// Assumes SAFEApp interface has been obtained
const asyncFn = async () => {
    try {
        const signKeyPair = await app.crypto.generateSignKeyPair();
        const pubSignKey = signKeyPair.pubSignKey;
        const rawPubSignKey = await pubSignKey.getRaw();
    } catch (err) {
        throw err;
    }
};

verify(data) → {Promise.<Buffer>}

Verify the given signed data using the public sign key

Parameters:
Name Type Description
data Buffer

Signed data to be verified

Source:
Example
// Assumes SAFEApp interface has been obtained
const asyncFn = async () => {
    try {
      const signKeyPair = await app.crypto.generateSignKeyPair();
      const pubSignKey = signKeyPair.pubSignKey;
      const verifiedData = await pubSignKey.verify(data);
    } catch(err) {
      throw err;
    }
};