all files / core/security/digital-signature/ pdf-key-identifier.js

63.64% Statements 7/11
100% Branches 0/0
50% Functions 2/4
63.64% Lines 7/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17                    
define(["require", "exports", "../encryptors/secureHash-algorithm1"], function (require, exports, secureHash_algorithm1_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var _PdfSubjectKeyIdentifier = (function () {
        function _PdfSubjectKeyIdentifier(info) {
            this._bytes = this._generateKeyID(info);
        }
        _PdfSubjectKeyIdentifier.prototype._generateKeyID = function (info) {
            var sha1 = new secureHash_algorithm1_1._Sha1();
            var publicKeyBytes = info._publicKey._data;
            return sha1._hash(publicKeyBytes, 0, publicKeyBytes.length);
        };
        return _PdfSubjectKeyIdentifier;
    }());
    exports._PdfSubjectKeyIdentifier = _PdfSubjectKeyIdentifier;
});