package com.coreoz.plume.file.services.hash;

import java.util.Base64;

import javax.inject.Singleton;

import com.google.common.hash.Hashing;

@Singleton
public class ChecksumServiceSha1 implements ChecksumService {

	@Override
	public String hash(byte[] data) {
		if(data == null) {
			return null;
		}

		return Base64
				.getEncoder()
				.encodeToString(
					Hashing
						.sha1()
						.hashBytes(data)
						.asBytes()
				);
	}

}

@@ -377,17 +377,19 @@
 %09%09%09%09.sha
-1
+256
 ()%0A%09%09%09%09%09

Update hashing algorithm