Lines Matching refs:ByteString
616 // ByteString is used throughout in order to avoid signedness issues with a
618 typedef std::basic_string<uint8> ByteString;
620 static ByteString Encrypt(base::StringPiece plaintext,
622 ByteString key;
623 ByteString ske = SerializeSymmetricKeyEncrypted(passphrase, &key);
625 ByteString literal_data = SerializeLiteralData(plaintext);
626 ByteString se = SerializeSymmetricallyEncrypted(literal_data, key);
633 static ByteString MakePacket(unsigned tag, const ByteString& contents) {
634 ByteString header;
659 static ByteString SerializeLiteralData(base::StringPiece contents) {
660 ByteString literal_data;
667 literal_data += ByteString(reinterpret_cast<const uint8*>(contents.data()),
675 static ByteString SerializeSymmetricKeyEncrypted(base::StringPiece passphrase,
676 ByteString *out_key) {
677 ByteString ske;
685 ByteString salt(sizeof(salt64), 0);
688 ske += ByteString(reinterpret_cast<uint8*>(&salt64), sizeof(salt64));
696 *out_key = ByteString(key, sizeof(key));
703 static ByteString SerializeSymmetricallyEncrypted(ByteString plaintext,
704 const ByteString& key) {
709 ByteString packet;
729 packet += ByteString(prefix, sizeof(prefix));
731 ByteString plaintext_copy = plaintext;
745 plaintext_copy += ByteString(digest, sizeof(digest));
790 Encrypter::ByteString b =