archive50.go
func (a *archive50) parseEncryptionBlock(b readBuf) error {
	if ver := b.uvarint(); ver != 0 {
		return errUnknownEncMethod
	}
	flags := b.uvarint()
	keys, err := a.getKeys(&b)
	if err != nil {
		return err
	}
	if flags&enc5CheckPresent > 0 {
		if err := checkPassword(&b, keys); err != nil {
			return err
		}
	}
	a.blockKey = keys[0]
	return nil
}
func (a *archive50) parseEncryptionBlock(b readBuf) error {
	if ver := b.uvarint(); ver != 0 {
		return errUnknownEncMethod
	}
	flags := b.uvarint()
	keys, err := a.getKeys(&b)
	if err != nil {
		return err
	}
	if flags&enc5CheckPresent > 0 {
		if err := checkPassword(&b, keys); err != nil {
			return err
		}
	}
	a.blockKey = keys[0]
	return nil
}
// parseEncryptionBlock calculates the key for block encryption.